package com.cskaoyan.catmall.controller.background;

import com.cskaoyan.catmall.model.vo.BaseRespVo;
import com.cskaoyan.catmall.model.vo.InfoDataVO;
import com.cskaoyan.catmall.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date: 2022-01-07-11-45
 * @author: ZYY
 * @description: 登录首页的显示
 */

@RestController
public class InfoController {
    @Autowired
    InfoService infoService;
    @RequestMapping("/admin/dashboard")
    public BaseRespVo dashboard(){
       InfoDataVO data = infoService.dashboard();
        return BaseRespVo.ok(data);
    }
}